﻿using System;
using System.Text;
using System.Web;

namespace Bouyei.NetworkSniffer.NetworkDecode
{
    public class Http
    {
        byte[] buffer = null;
        public Http(byte[] buffer)
        {
            this.buffer = buffer;
        }

        public string ToString(string encoding="UTF-8")
        {
            if (buffer==null || buffer.Length<=0) return string.Empty;
            return HttpUtility.UrlDecode(buffer, Encoding.GetEncoding(encoding));
        }
    }
}
